
package com.thor.palmmall.dao.ipapk;

import org.springframework.core.convert.converter.Converter;

import com.thor.palmmall.rest.hdmall.ipapk.MIpapk;

public class MIpapkConverter implements Converter<PMIpapk, MIpapk> {

  @Override
  public MIpapk convert(PMIpapk source) {
    if (source == null)
      return null;

    MIpapk target = new MIpapk();
    target.inject(source);
    target.setForceUpdate(source.isForceUpdate());
    target.setType(source.getType());
    target.setUrl(source.getUrl());
    target.setVersion(source.getVersion());
    target.setBackgroundUrl(source.getBackgroundUrl());
    target.setDesc(source.getVersionnote());
    return target;
  }

}
